package com.cosina.game.robodefence.ui;

import com.cosina.game.robodefence.ui.view.ViewPort;

import android.graphics.Point;

public class PxUpper {
	public static final Point resultContainer = new Point();
	
	public static Point getUpperPx(int screenX, int screenY){
		int hsx = ViewPort.hsv.getScrollX();
		int hsy = ViewPort.vsv.getScrollY();
		
		
		int tileX = (screenX + hsx) /40;
		int tileY = (screenY + hsy) /40;
		if(tileY >= 3)
			tileY -= 2;
		resultContainer.set(tileX, tileY);
		return resultContainer;
	}
}
